/*******************************************************************************
SANTAK ELECTRONIC Ltd
RTOS kernel for ups ,All rights reserved
VERSION:		V00
File name:		OS_config.h
Description:		TASK SCHEDULE FUNCTIONS
Update Date:		2006/06/13
Writer:			ZD
Modifier:		HY
*******************************************************************************/
#ifndef _OSCONFIG_H
#define _OSCONFIG_H

/*******************************************************************************
                                        CONTROL SWITCH					                    
*******************************************************************************/

#define	OS_TASK_IDLE_EN			0		/*	Argument check enable switch	*/
#define	OS_TABLE_IN_FLASH		0		/*	constant variable in ram or rom	*/ 
#define	OS_STK_GROWTH_UP		0		/*	STACK GROWTH DIRECTION		*/
#define	OS_STK_CHK_EN		    1       /*	STACK CHECK ENABLE		*/  


/*******************************************************************************
                                          STACK CONFIG
*******************************************************************************/

#define	OS_MAX_STK_SIZE			900   /*	MAX SYSTEM STACK SIZE		*/

/*******************************************************************************
				                    TASK CONFIG			                     			    
*******************************************************************************/
#define	OS_LOWEST_PRIO			2	    /*	MAX TASK NUMBER-1	 wkj	*/

#if	OS_TASK_IDLE_EN>0
#define OS_IDLE_PRIO			7		/*	LOWEST PRIORITY			*/ 
#define OS_TASK_IDLE_STK_SIZE	100		/*	IDLE TASK STACK SIZE*/ 
#define	OS_CPUFREE_FACTOR		37		/*  CALCULATION THE CPU USEAGE*/ 
#endif

/*******************************************************************************
				EVENT NUMNER DEFINITION				
*******************************************************************************/

#define	TASK_EVENT			INT32U	//modify event length from 16 to 32


/*******************************************************************************
					TIMER CONFIG						
*******************************************************************************/
#define OS_TICKS_PER_SEC		500		/*	THE TIMER ISR NUMBER IN 1S	*/
#define OS_Systimer_EN			1            /* system timer Enable*/
#endif
